package gof.starbuzz;

/**
 * TODO
 * 2020-11-04 17:48
 */
public class Mocha extends CondimentDecorator{

    Beverage beverage;

    public Mocha(Beverage beverage){
        this.beverage = beverage;
    }

    @Override
    public String description() {
        return beverage.description + ", Mocha";
    }

    @Override
    public double cost() {
        return .2 + beverage.cost();
    }

    public static void main(String[] args) {
        Beverage beverage = new Espresso();
        System.out.println(beverage.description() + "$" + beverage.cost());
        beverage  = new Mocha(beverage);
        System.out.println(beverage.description() + "$" + beverage.cost());
        beverage  = new Mocha(beverage);
        System.out.println(beverage.description() + "$" + beverage.cost());
        Beverage beverage2 = new HouseBlend();

    }
}
